

from basic.basic_page import BasicPage


class PageMain(BasicPage):

    def goto_main(self):
        """
        跳转我的页面
        :return: None
        """
        pass
    def goto_service_page(self):
        """
        跳转服务页面
        :return: PageService对象
        """
        from page.page_service.page_navigation_service import PageService
        return PageService()

    def goto_new_product_page(self):
        """
        跳转小米上新页面
        :return: PageEntranceNewProductsAvailable对象
        """
        from page.page_shopping.page_entrance_new_products_available import PageEntranceNewProductsAvailable
        print(self.driver.current_activity)
        value = "new UiSelector().text(\"小米上新\")"
        self.click(value)
        return PageEntranceNewProductsAvailable()

    def goto_classification_page(self):
        """
        跳转分类页面
        :return: PageClassification对象
        """
        pass

if __name__ == '__main__':
    from page.page_main import PageMain
    PageMain().goto_new_product_page().new_product_list().add_to_cart()


